<template>
  <div @click="fun(id)">
      <img :src="giftimage">
      <p>{{shoptitle}}</p>
      <span>{{collectnum}} | {{goodnum}}</span>
      <hr>
  </div>
</template>

<script>
export default {
    props:["giftimage","shoptitle","collectnum","goodnum","id"],
    methods:{
        fun(id){
            // this.$router.push("/strategy")
            // 路由传参
            // params方式发送
            // this.$router.push({name:"你要去的路由的名字",params:{你要传递数据的key:数据的val}})
            this.$router.push({name:"Strategy",params:{xiaoming:id}})
            // query方式发送
            // this.$router.push({name:"你要去的路由的名字",query:{你要传递数据的key:数据的val}})
            // this.$router.push({name:"all",query:{xiaohong:id}})
        }
    }
}
</script>

<style scoped>
div{
    font-size: 0;
    margin-bottom: 0.2rem;
}
img{
    width: 100%;
}
p{
    font-size: 0.26rem;
    margin: 0.1rem 0;
}
span{
    display: block;
    font-size: 0.16rem;
    color: #b9b5b5;
    padding-bottom: 0.1rem;
}
</style>